Determining document authenticity in a closed-loop process

ABSTRACT

A document authentication method uses a watermark added in a printed document to detection possible alterations made to the document after it was printed. First, a visible watermark in the form of a dot pattern is overlapped with an original digital image. The watermarked image is printed out as a halftone image at a first resolution. The watermark in the printed document appears as a light gray shade. Later, the printed document is scanned back using a grayscale scan at a resolution higher than the first resolution. In the scanned image, altered areas would appear flat (lacking intensity variation) whereas unaltered areas will have relatively large density variations due to the watermark dots and the fact that the image was halftone printed at a lower resolution. Alternations are detected by identifying flat areas within the image using a combination of flat block detection and a multiple thresholds method.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to document management, and in particular, itrelates to a method for determining the authenticity of a digitaldocument after it has been printed and then scanned in a closed-loopprocess.

2. Description of Related Art

A closed-loop process refers to printing an original digital document(which may include text, graphics, images, etc.), using the printed hardcopy of the document such as distributing it, copying it, etc., and thenscanning a hard copy of the document back into digital form.Authenticating a scanned digital document refers to determining whetherthe scanned document is an authentic copy of the original digitaldocument, i.e., whether the document has been altered while it was inthe hard copy form. Certain proposed method of authenticating a scanneddocument performs an image comparison of the scanned document with theoriginal digital document. Such a comparison may be difficult to achieveto adequate accuracy due to various distortions to the original digitalimage during the print and scan process.

SUMMARY

The present invention is directed to a method for authenticating adocument that substantially obviates one or more of the problems due tolimitations and disadvantages of the related art.

An object of the present invention is to detect alterations to documentsin a closed-loop process, i.e., after the document is print and thenscanned.

A document authentication method according to embodiments of the presentinvention eliminates the sole reliance on the method of original digitalimage and scanned image comparison when detecting image authenticity.

Additional features and advantages of the invention will be set forth inthe descriptions that follow and in part will be apparent from thedescription, or may be learned by practice of the invention. Theobjectives and other advantages of the invention will be realized andattained by the structure particularly pointed out in the writtendescription and claims thereof as well as the appended drawings.

To achieve these and/or other objects, as embodied and broadlydescribed, the present invention provides a method for authenticating aprinted document, including: obtaining a digital document image; addinga watermark to the digital document image, the watermark including apattern of dots, each dot being larger than or equal to one by one pixelas defined by a first spatial resolution; printing the documentincluding the watermark using halftone printing at the first spatialresolution; scanning the printed document at a second spatial resolutionequal to or higher than the first spatial resolution to obtain a scannedimage; and detecting any alteration in the scanned image by identifyingareas within the scanned image containing low pixel intensity variation.

In another aspect, the present invention provides a method forauthenticating a printed document, the document having been printed froma digital image using halftone printing at a first spatial resolution,the digital image containing a watermark added to an original digitaldocument image, the watermark including a pattern of dots, each dotbeing larger than or equal to one by one pixel as defined by the firstspatial resolution, the method including: scanning the printed documentat a second spatial resolution equal to or higher than the first spatialresolution to obtain a scanned image; and detecting any alteration inthe scanned image by identifying areas within the scanned imagecontaining low pixel intensity variation.

In another aspect, the present invention provides a computer programproduct that causes a data processing apparatus to perform the abovemethods.

In yet another aspect, the present invention provides a data processingsystem, which includes: a scanning section for scanning a printeddocument to generate a scanned image, the printed document having beenprinted from a digital image using halftone printing at a first spatialresolution, the digital image containing a watermark added to anoriginal digital document image, the watermark including a pattern ofdots being larger than or equal to one by one pixel as defined by thefirst spatial resolution, wherein the scanner scans the printed documentat a second spatial resolution equal to or higher than the first spatialresolution; and a processing section for processing the scanned image todetecting any alteration therein by identifying areas within the scannedimage containing low pixel intensity variation.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and areintended to provide further explanation of the invention as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A and 1B illustrates an overall process of documentauthentication according to an embodiment of the present invention.

FIG. 2 is an enlarged view of an area of a scanned image generated byscanning back the watermarked document.

FIG. 3 is a flowchart illustrating a method for detecting alterations ina printed document according to an embodiment of the present invention.

FIGS. 4A-4L illustrate examples of various steps of the method fordetecting alterations of FIG. 3.

FIG. 5 shows an example of the result of alteration detection.

FIG. 6 illustrates a data processing system

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

A document authentication method according to embodiments of the presentinvention uses a watermark that is added to the digital image as well asprinter halftone information to accomplish detection of alterations inthe printed document. The overall process of the authentication methodis shown in FIGS. 1A and 1B. First, an original digital document isobtained (step S11). In this disclosure, unless otherwise specified, adigital document refers to a digital image as opposed to, for example, atext based document. Step S11 may be done by scanning a printeddocument, generating the digital document from digital data using acomputer program, receiving the digital document from another electronicsource, etc. The document is converted into a format that allows imagemanipulation, if it is not already in such a format. If the document isscanned from a printed document, a grayscale scan as opposed to a blackand white scan is used so that the scanned digital document is agrayscale image. Then, a visible watermark in the form of a regularlyarranged dot pattern covering substantially the entire area of thedocument is overlapped with the original digital document to create awatermarked image of the original digital document (step S12). The sizeof the dots is 1 by 1 pixels or larger where the pixels are defined by afirst spatial resolution, such as 300 dpi. Alternatively, the dots inthe watermark may be irregularly arranged as long as they aresufficiently dense so that each block of image for analysis (describedin more detail later) contains a sufficient number of dots. Further, thewatermark may cover only a portion of the document, in which case onlythe portion containing the watermark is later authenticated.

In the following descriptions, unless otherwise specified, an 8-bitgrayscale range where 0 is black is used in the various examples. Thoseskilled in the art will be readily able to apply the methods to adifferent grayscale range.

When adding the watermark to the original digital document, regions ofoverlap (i.e. where the dots of the watermark exist) are darkened orlightened to reflect the blend color. In a preferred embodiment, when anoriginal pixel value in a region of overlap is lighter than or equal toan intensity threshold value (i.e. it is located in a relatively lightcolored or blank area of the original image), it is darkened by a valuereferred to as the first watermark intensity value. When an originalpixel value in a region of overlap is darker than the intensitythreshold value (i.e. it is located in an area of the image that hasrelatively dark content), it is lightened by a value referred to as thesecond watermark intensity value. The first and second watermarkintensity value may be the same or different. In one particular example,the intensity threshold value is 255 (i.e. white), and the first andsecond watermark intensity values are 51. In an alternative embodiment,pixels in all regions of overlap are darkened regardless of the originalpixel value (resulting pixel values exceeding the darkest possible value(0) are set to the darkest pixel value). More generally, the watermarkintensity values added or subtracted from the original pixel value maybe any suitable function of the original pixel value, with the generalgoal of generating an image with visible watermark dots in all imageareas (both originally dark areas and originally light areas). Inaddition, the size of the watermark dots may vary depending on theoriginal pixel value. For example, watermark does in very dark areas(lighter toned dots in vary dark areas) may be made larger than graytoned watermark dots in white areas.

This watermarked image is printed out as a halftone image at the firstspatial resolution (e.g. 300 dpi) (step S13), and the printed documentis used (e.g. distributed, etc.) The printed document carries a visiblewatermark in the form of a light gray shade.

Later, a detection process shown in FIG. 1B is carried out to determinewhether the printed document (carrying the watermark) has been alteredsince it was printed. First, the printed document is scanned back usinga grayscale scan at a second spatial resolution that is higher than thefirst spatial resolution (step S14). For example, the second resolutionmay be 600 dpi when the first resolution is 300 dpi. When a grayscaleimage is converted to a halftones (binary) image during the printprocess (as in step S13), a gray color is printed as a pattern of blackdots (halftone dots), their size (AM—Amplitude Modulated) or spatialfrequency (FM—Frequency Modulated) is varied correspondingly to simulatethe grayscale value. When the printed halftone image is scanned backusing a resolution higher than the resolution at which it was printed(as in step S14), the halftone dots are visible in the scanned image, asshown in FIG. 2. As shown in FIG. 2, which is an enlarged view of anarea of a scanned image generated by step S14, clusters of halftone dotscan be seen in the “white” areas of the image, where each cluster (e.g.22 in FIG. 2) corresponds to a gray dot in the watermark. Note that theeffect of the watermark dots is also present in the “black” areas of thescanned image (e.g., where text is present).

FIG. 2 also illustrates an area 24 where the printed document wasaltered between the print (step S13) and scan (step S14), in thisparticular example, by adding the text “ALTER” with a dark pen. It canbe observed that in the scanned-back image, the altered areas (thestrokes in the altered text) are relatively “flat”, meaning the pixelintensity within the altered areas vary by relatively small amounts. Incontrast, in areas of the image that have not been altered, relativelylarge density variation exists in both “white” areas (these correspondto the white areas of the original document image before the watermarkwas added) and gray or black areas (e.g. where text or other imageelements are present). The relatively large density variation is due tothe fact that watermark dots have been added to the image and that theimage was printed with a halftone printer at a lower resolution. Thealteration detection step (step S15) detects alternations by identifyingflat areas (i.e. areas containing low intensity variation) within theimage. It uses a combination of flat block detection and additionalmultiple threshold method for robust alteration detection. This step candetect and identify alterations and separate them from the document.FIG. 5 illustrates an example of the result of step S15, where thealterations are separated from the original document (note that FIG. 5is a only portion of the image in FIG. 2).

The alteration detection algorithm used in step S15 is described belowwith reference to the flowchart shown in FIG. 3. The detection algorithmfirst selects a block of the image for processing (step S301). The blockmay be selected by dividing the image into a plurality of tiles each ofa predetermined size (e.g., 16×16 pixels in the illustrated example).For each block, a measure of “flatness” is calculated based on pixelintensities in the block (step S302). In the preferred embodiment, themeasure of flatness is defined as the difference between the maximumpixel intensity and the minimum pixel intensity in the block. Otheralternative measure of flatness may be used, such as standard deviation,variance, etc. If the measure of flatness is equal to or below a firstpredetermined threshold (“Y” in step S303), the entire block is markedas altered (step S304) and the process continues to the next block. In apreferred embodiment, the first predetermined threshold is 1. If theblock is not determined to be flat (“N” in step S303), then the block isfurther processed in steps S305 to S314 to determine whether a portionof it is flat. The flat portion is considered altered areas.

Steps S305 to S314 are explained with reference to the example shown inFIGS. 4A-4L. FIG. 4A shows a block 41 having 16×16 pixels, each pixelhaving a grayscale value. First, a grayscale to binary conversion isperformed for each pixel using a second predetermined threshold (stepS305). In a preferred embodiment, the second predetermined threshold is250. FIG. 4B shows the block having been converted to binary values.Then, a connected component analysis is performed where pixels adjacentto one another with the same value are labeled as a connected component(step S306). FIG. 4C illustrates a number of connected components 42 a,42 b, 42 c, etc. identified in step S306. Each connected componenthaving a pixel count larger than or equal to a third predeterminedthreshold is labeled as a perspective candidate for alteration and itscentroid is determined (step S308), while connected components having apixel count less than the third threshold are discarded (step S307). Ina preferred embodiment, the third predetermined threshold is 81. FIG. 4Dillustrates a perspective candidate 42 a, the smaller connectedcomponents 42 b, 42 c, etc. seen in FIG. 4C having been discarded.

For each perspective candidate for alteration, an extended block ofinterest for which the determined centroid acts as its center isselected (step S309). In a preferred embodiment, a size of 32×32 pixelsis used for the extended block of interest. FIG. 4E illustrates theextended block of interest 43, whose center is the centroid of thecandidate 42 a in FIG. 4D. This extended block of interest 43 is thenprocessed to obtain two binary maps representing the alterationdetection result. The first binary map is obtained by thresholdsegmentation (step S310) whereby pixels having intensities fallingwithin a predetermined range are marked as 1 or “on”. In a preferredembodiment, the predetermined range is between the minimum pixelintensity plus a predetermined fraction of the total intensity range andthe maximum pixel intensity minus the predetermined fraction of thetotal intensity range. The total intensity range is defined as thedifference between the maximum pixel intensity and the minimum pixelintensity within the extended block of interest. The predeterminedfraction is ⅕ in the preferred embodiment. FIG. 4F shows the firstbinary map where the pixels marked as “on” are shown in black. Thesecond binary map is obtained by region growth from a seed pixel (stepS311) whereby each neighboring pixel is compared to the current regionmean and added to the region if its difference from the mean is within atolerance threshold (a fourth predetermined threshold). In a preferredembodiment, the fourth predetermined threshold is 25% of the mean. Theseed pixel chosen is the pixel with the minimum value (i.e. the darkestpixel) in the current connected component of interest (i.e. candidate 42a) part of the block before the extension (i.e. the 16×16 block). Duringthe region growth process, pixels larger than 250 is not considered toprevent the growth of a region into the background white areas. FIG. 4Gshows the seed pixel 44, and FIG. 4H shows the second binary map as theresult of region growth from the seed pixel where the region is shown inblack. Each of these two binary maps is then eroded whereby pixels notconnected in all 8 neighbors are removed (step S312). FIG. 4I shows thesecond eroded binary map, i.e., the result of region erosion for thesecond binary map. Next, a connected component analysis is conducted oneach of the two eroded binary maps and connected components with pixelcounts less than a fifth predetermined threshold are removed (stepS313). In a preferred embodiment, the fifth predetermined threshold is81 pixels. Step S313 results in first and second detected alterationbinary maps from the first and second eroded binary maps. FIGS. 4 k and4J show the first and second detected alteration binary maps,respectively. A bitwise OR operation is conducted on the first andsecond detected alteration binary maps (step S314) to obtain the finaldetected alteration binary map where pixels that are “on” or 1 indicatealtered pixels. FIG. 4L shows the final detected alteration binary map.Steps S302 to S314 are repeated for each block until the entire image isprocessed. Finally, all blocks that are marked as altered in step S304and all alteration binary maps obtained in step S314 are combined (stepS315) to generate an alteration image that contains the alterations inthe printed document (see FIG. 5).

Referring back to FIGS. 1A and 1B, the steps for generating a printeddocument carrying a watermark (i.e. steps S11 to S13) and the steps ofdetecting alterations in a printed document carrying a watermark (i.e.steps S14 and S15) do not have to be performed by the same person or atthe same location. In other words, one person can perform the printingsteps without regard to whether or how the alteration detection stepswill be performed, so long as the watermark is adequately added, andanother person can perform the alternation detection steps withoutregard to the origin of the printed document, so long as the printeddocument carries an adequate watermark and the scanning is done at ahigher spatial resolution than the resolution at which the document wasprinted. The step of adding a watermark (step S12) may be performed byany data processing device with adequate processing capabilities, suchas a computer, a printer, an all-in-one (AIO) device that combinesprinting, scanning and copying functions, etc. Likewise, the step ofdetecting alterations (step S15) may be performed by any data processingdevice with adequate processing capabilities, such as a computer, ascanner, and AIO, etc. The result of the alteration detection step,which may be in the form of an image showing the alterations (e.g., asillustrated in FIG. 5), may be displayed to a user, stored, transmittedto another data processing device, or otherwise used by a user (step S16in FIG. 1B).

FIG. 6A schematically illustrates a data processing system in which anauthentication method according to embodiments of the present inventionmay be implemented. The data processing system includes a printer 602connected to a computer 606, and a scanner 604 connected to a computer608. The printer 602 and scanner 604 each include standard hardware andsoftware components familiar to those skilled in the relevant art anddetailed descriptions of them are omitted here. The process of adding awatermark (step S12 in FIG. 1A) may be performed by the computer 606 ora processor in the printer 602. The process of detecting alteration(step S15 in FIG. 1B) may be performed by the computer 608 or aprocessor in the scanner 604. FIG. 6B schematically illustrates anall-in-one device (AIO) in which an authentication method according toembodiments of the present invention may be implemented. The AIO 610(also referred to as a multifunction device) is a device that includesboth a printing section 614 and a scanning section 616 and can performprinting, scanning and copying functions. The process of adding awatermark and/or the process of detecting alterations may be performedby the processor 612 of the AIO or a computer connected to the AIO (notshown).

In preferred embodiments, the resolution at which the watermarkeddocument is scanned back is higher than the resolution at which thewatermarked document is printed. Alternatively, the scan resolution maybe the same as the print resolution, but it would require the originaldigital image intensity to be lightened or the original image resolutionto be reduced. By doing so, the halftone dots can still be visible evenif not scanned at a higher resolution. Such measures, however, tend toreduce the image quality of the printed document and are not preferred.

The alteration detection method described above can be applied even whenthe printed document is copied before it is altered, as long as thecopying preserves the halftone nature of the printed document or isitself a halftone image generated by the printer. If the printeddocument is copied after it is altered, the applicability of thealternation detection method would depend on the way the copiermanipulates the image when copying.

It will be apparent to those skilled in the art that variousmodification and variations can be made in the method for detectingalterations in a printed document according to the present inventionwithout departing from the spirit or scope of the invention. Thus, it isintended that the present invention cover modifications and variationsthat come within the scope of the appended claims and their equivalents.

1. A method for authenticating a printed document, comprising: obtaininga digital document image; adding a watermark to the digital documentimage, the watermark including a pattern of dots, each dot being largerthan or equal to one by one pixel as defined by a first spatialresolution; printing the document including the watermark using halftoneprinting at the first spatial resolution; scanning the printed documentat a second spatial resolution equal to or higher than the first spatialresolution to obtain a scanned image; and detecting any alteration inthe scanned image by identifying areas within the scanned imagecontaining low pixel intensity variation.
 2. The method of claim 1,wherein the detecting step comprises: (a) dividing the scanned imageinto a plurality of blocks each having a plurality of pixels; for eachblock, (b) calculating a measure of flatness of the block; and (c)marking the block as altered if the measure of flatness is equal to orbelow a first predetermined threshold; for each block not marked asaltered, (d) performing a grayscale to binary conversion for each pixelin the block using a second predetermined threshold; (e) performing afirst connected component analysis to obtain one or more connectedcomponents; (f) for each connected component having a pixel count largerthan or equal to a third predetermined threshold, selecting an extendedblock of interest centered on a centroid of the connected component andgenerating an alteration binary map in the extended block of interestrepresenting alternations in the printed document; and (g) combining allblocks marked as altered in step (c) and all alteration binary mapsgenerated in step (f) to generate an alteration image.
 3. The method ofclaim 2, wherein step (f) comprises: (f1) generating a first binary mapby threshold segmentation wherein pixels having intensities fallingwithin a predetermined range are marked as on; (f2) generating a secondbinary map by region growth from a seed pixel, the seed pixel being thedarkest pixel in the extended block of interest, wherein eachneighboring pixel is compared to a mean of a current region and added tothe region if its difference from the mean is within a fourth threshold;(f3) eroding the first and second binary map by removing pixels notconnected in all eight neighbors to generate first and second erodedbinary maps, respectively; (f4) performing a second connected componentanalysis on each of the first and second eroded binary maps and removingconnected components with pixel counts less than a fifth predeterminedthreshold to obtain first and second detected alteration binary maps;and (f5) bitwise ORing the first and second detected alteration binarymaps to obtain the alteration binary map.
 4. The method of claim 1,wherein the adding step includes, for each pixel within a dot of thewatermark, adding a first watermark intensity value to or subtracting asecond watermark intensity value from an original pixel value of thedigital document image depending on the original pixel value.
 5. Amethod for authenticating a printed document, the document having beenprinted from a digital image using halftone printing at a first spatialresolution, the digital image containing a watermark added to anoriginal digital document image, the watermark including a pattern ofdots, each dot being larger than or equal to one by one pixel as definedby the first spatial resolution, the method comprising: scanning theprinted document at a second spatial resolution equal to or higher thanthe first spatial resolution to obtain a scanned image; and detectingany alteration in the scanned image by identifying areas within thescanned image containing low pixel intensity variation.
 6. The method ofclaim 5, wherein detecting step comprises: (a) dividing the scannedimage into a plurality of blocks each having a plurality of pixels; foreach block, (b) calculating a measure of flatness of the block; and (c)marking the block as altered if the measure of flatness is equal to orbelow a first predetermined threshold; for each block not marked asaltered, (d) performing a grayscale to binary conversion for each pixelin the block using a second predetermined threshold; (e) performing afirst connected component analysis to obtain one or more connectedcomponents; (f) for each connected component having a pixel count largerthan or equal to a third predetermined threshold, selecting an extendedblock of interest centered on a centroid of the connected component andgenerating an alteration binary map in the extended block of interestrepresenting alternations in the printed document; and (g) combining allblocks marked as altered in step (c) and all alteration binary mapsgenerated in step (f) to generate an alteration image.
 7. The method ofclaim 6, wherein step (f) comprises: (f1) generating a first binary mapby threshold segmentation wherein pixels having intensities fallingwithin a predetermined range are marked as on; (f2) generating a secondbinary map by region growth from a seed pixel, the seed pixel being thedarkest pixel in the extended block of interest, wherein eachneighboring pixel is compared to a mean of a current region and added tothe region if its difference from the mean is within a fourth threshold;(f3) eroding the first and second binary map by removing pixels notconnected in all eight neighbors to generate first and second erodedbinary maps, respectively; (f4) performing a second connected componentanalysis on each of the first and second eroded binary maps and removingconnected components with pixel counts less than a fifth predeterminedthreshold to obtain first and second detected alteration binary maps;and (f5) bitwise ORing the first and second detected alteration binarymaps to obtain the alteration binary map.
 8. A computer program productcomprising a computer usable medium having a computer readable programcode embedded therein for controlling a data processing apparatus, thecomputer readable program code configured to cause the data processingapparatus to execute a process for authenticating a scanned imageobtained by scanning a printed document, the printed document havingbeen printed from a digital image using halftone printing at a firstspatial resolution, the digital image containing a watermark added to anoriginal digital document image, the watermark including a pattern ofdots being larger than or equal to one by one pixel as defined by thefirst spatial resolution, the scanning having been performed at a secondspatial resolution equal to or higher than the first spatial resolution,the process comprising: (a) dividing the scanned image into a pluralityof blocks each having a plurality of pixels; for each block, (b)calculating a measure of flatness of the block; and (c) marking theblock as altered if the measure of flatness is equal to or below a firstpredetermined threshold; for each block not marked as altered, (d)performing a grayscale to binary conversion for each pixel in the blockusing a second predetermined threshold; (e) performing a first connectedcomponent analysis to obtain one or more connected components; (f) foreach connected component having a pixel count larger than or equal to athird predetermined threshold, selecting an extended block of interestcentered on a centroid of the connected component and generating analteration binary map in the extended block of interest representingalternations in the printed document; and (g) combining all blocksmarked as altered in step (c) and all alteration binary maps generatedin step (f) to generate an alteration image.
 9. The computer programproduct of claim 8, wherein step (f) comprises: (f1) generating a firstbinary map by threshold segmentation wherein pixels having intensitiesfalling within a predetermined range are marked as on; (f2) generating asecond binary map by region growth from a seed pixel, the seed pixelbeing the darkest pixel in the extended block of interest, wherein eachneighboring pixel is compared to a mean of a current region and added tothe region if its difference from the mean is within a fourth threshold;(f3) eroding the first and second binary map by removing pixels notconnected in all eight neighbors to generate first and second erodedbinary maps, respectively; (f4) performing a second connected componentanalysis on each of the first and second eroded binary maps and removingconnected components with pixel counts less than a fifth predeterminedthreshold to obtain first and second detected alteration binary maps;and (f5) bitwise ORing the first and second detected alteration binarymaps to obtain the alteration binary map.
 10. A data processing system,comprising: a scanning section for scanning a printed document togenerate a scanned image, the printed document having been printed froma digital image using halftone printing at a first spatial resolution,the digital image containing a watermark added to an original digitaldocument image, the watermark including a pattern of dots being largerthan or equal to one by one pixel as defined by the first spatialresolution, wherein the scanner scans the printed document at a secondspatial resolution equal to or higher than the first spatial resolution;and a processing section for processing the scanned image to detectingany alteration therein by identifying areas within the scanned imagecontaining low pixel intensity variation.
 11. The data processing systemof claim 10, wherein the processing section carries out an alterationdetection process that comprises: (a) dividing the scanned image into aplurality of blocks each having a plurality of pixels; for each block,(b) calculating a measure of flatness of the block; and (c) marking theblock as altered if the measure of flatness is equal to or below a firstpredetermined threshold; for each block not marked as altered, (d)performing a grayscale to binary conversion for each pixel in the blockusing a second predetermined threshold; (e) performing a first connectedcomponent analysis to obtain one or more connected components; (f) foreach connected component having a pixel count larger than or equal to athird predetermined threshold, selecting an extended block of interestcentered on a centroid of the connected component and generating analteration binary map in the extended block of interest representingalternations in the printed document; and (g) combining all blocksmarked as altered in step (c) and all alteration binary maps generatedin step (f) to generate an alteration image.
 12. The data processingsystem of claim 11, wherein step (f) comprises: (f1) generating a firstbinary map by threshold segmentation wherein pixels having intensitiesfalling within a predetermined range are marked as on; (f2) generating asecond binary map by region growth from a seed pixel, the seed pixelbeing the darkest pixel in the extended block of interest, wherein eachneighboring pixel is compared to a mean of a current region and added tothe region if its difference from the mean is within a fourth threshold;(f3) eroding the first and second binary map by removing pixels notconnected in all eight neighbors to generate first and second erodedbinary maps, respectively; (f4) performing a second connected componentanalysis on each of the first and second eroded binary maps and removingconnected components with pixel counts less than a fifth predeterminedthreshold to obtain first and second detected alteration binary maps;and (f5) bitwise ORing the first and second detected alteration binarymaps to obtain the alteration binary map.
 13. The data processing systemof claim 10, wherein the processing section generates a watermarkedimage by adding a watermark to a digital document image, the watermarkincluding a pattern of dots, each dot being larger than or equal to oneby one pixel as defined by the first spatial resolution; the dataprocessing system further comprising a printing section for printing thewatermarked image.
 14. The data processing system of claim 13, whereinthe processing section adds the watermark by, for each pixel within adot of the watermark, adding a first watermark intensity value to orsubtracting a second watermark intensity value from an original pixelvalue of the digital document image depending on the original pixelvalue.